/**create by liuhua at 2020年10月22日 下午2:33:33**/
package com.star.aries.dto.res;

import java.time.LocalDate;
import java.time.LocalDateTime;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.star.aries.constant.SexEnum;
import com.star.aries.utils.excel.EnumIntegerConverter;
import com.star.aries.utils.excel.LocalDateConverter;
import com.star.aries.utils.excel.LocalDateTimeConverter;
import com.star.aries.utils.excel.LocalDateTimeFormat;
import com.star.aries.utils.excel.TargetEnum;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class StudentResponseDto {
  @ExcelIgnore
  private Long id;
  @ExcelProperty(value = "姓名", index = 0)
  private String name;
  @ExcelProperty(value = "性别", converter = EnumIntegerConverter.class, index = 1)
  @TargetEnum(targetEnum = SexEnum.class)
  private Integer sex;
  @ExcelProperty(value = "年龄", index = 2)
  private Integer age;
  @ExcelProperty(value = "生日", converter = LocalDateConverter.class, index = 3)
  @LocalDateTimeFormat(value = "yyyy-MM-dd")
  private LocalDate birth;
  @ExcelProperty(value = "创建日期", converter = LocalDateTimeConverter.class, index = 4)
  @LocalDateTimeFormat(value = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime createTime;
}
